﻿@model BBICMS.Model.ViewModel.Back.SiteInfoVM
@{
    ViewBag.Title = "基本信息";
    ViewBag.PageTitle = ViewBag.Title + "_常规设置";
 
}


    <div class="panel panel-default">
        <div class="panel-heading">
            <i class="glyphicon glyphicon-info-sign"></i> @ViewBag.Title
        </div>
        <div class="panel-body">
          
            @using (Ajax.BeginForm("Site", "Info", new AjaxOptions()
            {
                OnBegin = "onBegin",
                //   Confirm = "Are you sure you want to save this User?"
                OnSuccess = "updateSuccess",
                OnComplete = "onComplete"

            }, new { @class = "form-horizontal", role = "form" }))
            {
                @Html.AntiForgeryToken()
                @Html.ValidationSummary()


                <div class="form-group">
                    @Html.LabelFor(model => model.SiteName, new { @class = "col-md-2 control-label" })
                    <div class="col-md-5">
                        @Html.TextBoxFor(model => model.SiteName, new { @class = "form-control", placeholder = "站点名称" })
                        @Html.ValidationMessageFor(model => model.SiteName)
                    </div>                   
                </div>

                <div class="form-group">
                    @Html.LabelFor(model => model.SiteDomainName, new { @class = "col-md-2 control-label" })
                    <div class="col-md-5">
                        @Html.TextBoxFor(model => model.SiteDomainName, new { @class = "form-control", placeholder = "http://" })
                        @Html.ValidationMessageFor(model => model.SiteDomainName)
                    </div>
                   
                </div>

                <div class="form-group">
                    @Html.LabelFor(model => model.WebNumber, new { @class = "col-md-2 control-label" })
                    <div class="col-md-5">
                        @Html.TextBoxFor(model => model.WebNumber, new { @class = "form-control", placeholder = "工信部备案号" })
                        @Html.ValidationMessageFor(model => model.WebNumber)
                    </div>
                   
                </div>

                <div class="form-group">
                    @Html.LabelFor(model => model.BaiduSiteID, new { @class = "col-md-2 control-label" })
                    <div class="col-md-5">
                        @Html.TextBoxFor(model => model.BaiduSiteID, new { @class = "form-control", placeholder = "百度统计代码" })
                        @Html.ValidationMessageFor(model => model.BaiduSiteID)
                    </div>
                  
                </div>




                <div class="form-group">
                    <div class="col-sm-offset-2 col-md-10">
                        <button type="submit" class="btn btn-primary"><span class="glyphicon glyphicon-save"></span> 保存资料</button>
                    </div>

                </div>
            }
        </div>
    </div>


@section footer {
    @Scripts.Render("~/bundles/jqueryvalWithBootstrap")

<script>
    //$('form').validateBootstrap(true);

    function onBegin() {
        $("#divLoading").show();
    }
    function onComplete() {
        $("#divLoading").hide();
    }
    function updateSuccess(data) {
        Common.ShowBox(data.Status,data.Message, "@ViewBag.Title");       
      //  debugger;
    }
    $(function () {
        Common.ActiveCurrentNav();
    });
</script>
}
